package edu.gyc.mysystem.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import edu.gyc.mysystem.dao.StudentMapper;
import edu.gyc.mysystem.model.Student;
import edu.gyc.mysystem.service.StuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StuServiceImpl implements StuService {

    @Autowired
    StudentMapper studentMapper;

    @Override
    public PageInfo<Student> getStusByPageNo(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum,pageSize);
        List<Student> students=studentMapper.getAllStu();
        PageInfo<Student> data = new PageInfo<>(students);
        return data;
    }
}
